//
//  PKRequestManager.h
//  Pianke
//
//  Created by lanou on 15/12/22.
//  Copyright © 2015年 Huang. All rights reserved.
//

#import <Foundation/Foundation.h>

// 传值block
typedef void(^Finish)(NSData *data);
// 错误信息block
typedef void(^Error)(NSError *error);


// 枚举请求类型
typedef NS_ENUM(NSInteger, RequestType) {
    POST,
    GET
};

@interface PKRequestManager : NSObject

//新的请求数据的方法  登陆
+ (void)requestWithUrlString:(NSString *)urlString parDic:(NSDictionary *)parDic appendingString:(NSString *)appdingString method:(RequestType)method finish:(Finish)finish error:(Error)error;

//  注册
+(void)RegistWithnetUrl:(NSString*)netUrl loginName:(NSString*)loginName password:(NSString*)password validCode:(NSString*)validCode IDCard:(NSString*)IDCard method: (RequestType)method finish: (Finish)finish  error: (Error)error;

//提交心电数据
+(void)AddRemote_DataWithnetUrl:(NSString*)netUrl userID:(NSString*)userID UploadWay:(NSInteger)UploadWay zipData:(NSString*)zipData method: (RequestType)method finish: (Finish)finish  error: (Error)error;
//获取设备
+(void)GetDeviceInfoWithnetUrl:(NSString*)netUrl deviceID:(NSString*)deviceID method: (RequestType)method finish: (Finish)finish  error: (Error)error;


+(void)CheckUserDeviceWithnetUrl:(NSString*)netUrl userID:(NSString*)userID iDCode:(NSString*)iDCode method: (RequestType)method finish: (Finish)finish  error: (Error)error;


//绑定设备
+(void)ChangeDeviceUserIDWithnetUrl:(NSString*)netUrl userID:(NSString*)userID iDCode:(NSString*)iDCode password:(NSString*)password oldpassword:(NSString*)oldpassword method: (RequestType)method finish: (Finish)finish  error: (Error)error;



+(void)GetStaticPixelWithnetUrl:(NSString*)netUrl brand:(NSString*)brand model:(NSString*)model method: (RequestType)method finish: (Finish)finish  error: (Error)error;


+(void)GetPreSetMd5WithnetUrl:(NSString*)netUrl  method: (RequestType)method finish: (Finish)finish  error: (Error)error;


+(void)GetPreSetUrlsWithnetUrl:(NSString*)netUrl  method: (RequestType)method finish: (Finish)finish  error: (Error)error;


+(void)GetCurVerWithnetUrl:(NSString*)netUrl platform:(NSInteger)platform method: (RequestType)method finish: (Finish)finish  error: (Error)error;

// 修改密码
+(void)ChangePwdWithnetUrl:(NSString*)netUrl userID:(NSString*)userID password:(NSString*)password passwordOld:(NSString*)passwordOld method: (RequestType)method finish: (Finish)finish  error: (Error)error;

//  上传个人信息
+(void)UpdateUserBaseWithnetUrl:(NSString*)netUrl userID:(NSString*)userID iDCard:(NSString*)iDCard height:(NSNumber*)height weight:(NSNumber*)weight zipCode:(NSString*)zipCode realName:(NSString*)realName remark:(NSString*)remark fullAddr:(NSString*)fullAddr moblieNum:(NSString*)moblieNum method: (RequestType)method finish: (Finish)finish  error: (Error)error;

// 添加家属
+(void)AddUserFamilyWithnetUrl:(NSString*)netUrl userID:(NSString*)userID loginName:(NSString*)loginName fName:(NSString*)fName method: (RequestType)method finish: (Finish)finish  error: (Error)error;

// 删除家属
+(void)DeleteUserFamilyWithnetUrl:(NSString*)netUrl userID:(NSString*)userID iD:(NSInteger)iD method: (RequestType)method finish: (Finish)finish  error: (Error)error;

//忘记密码
+(void)ForgetPwdWithnetUrl:(NSString*)netUrl longName:(NSString*)longName vaildCode:(NSString*)vaildCode password:(NSString*)password method: (RequestType)method finish: (Finish)finish  error: (Error)error;

// 获取家属信息
+(void)GetMyFamilyWithnetUrl:(NSString*)netUrl userID:(NSString*)userID method: (RequestType)method finish: (Finish)finish  error: (Error)error;

//
+(void)GetMyWearerWithnetUrl:(NSString*)netUrl userID:(NSString*)userID method: (RequestType)method finish: (Finish)finish  error: (Error)error;

// 获取验证码
+(void)GetRegisterVerifyCodeWithnetUrl:(NSString*)netUrl loginName:(NSString*)loginName method: (RequestType)method finish: (Finish)finish  error: (Error)error;


+(void)GetForgetVerifyCodeWithnetUrl:(NSString*)netUrl moblieNo:(NSString*)moblieNo method: (RequestType)method finish: (Finish)finish  error: (Error)error;

// 上传地理信息
+(void)InserGPSWithnetUrl:(NSString*)netUrl userID:(NSString*)userID gPSLo:(NSString*)gPSLo gPSLa:(NSString*)gPSLa method: (RequestType)method finish: (Finish)finish  error: (Error)error;
// 获取个人信息
+(void)GetUserBaseWithnetUrl:(NSString*)netUrl userID:(NSString*)userID method: (RequestType)method finish: (Finish)finish  error: (Error)error;

+(void)uploadWithnetUrl:(NSString*)netUrl userID:(NSString*)userID  method: (RequestType)method finish: (Finish)finish  error: (Error)error array: (NSArray *)dataArr data:(NSData *)data;


//上传文件
+(void)ChangePwdWithnetUrl:(NSString*)netUrl upLoadWay:(NSString *)uploadWay userID:(NSString*)userID deviceID:(NSString *)deviceID filenames:(NSArray *)filenames data:(NSData *)fileData method: (RequestType)method finish: (Finish)finish  error: (Error)error;
//批量上传
+(void)uploadPiliangWithnetUrl:(NSString*)netUrl userID:(NSString*)userID deviceID:(NSString *)deviceID filenames:(NSString *)filename data:(NSData *)fileData method: (RequestType)method finish: (Finish)finish  error: (Error)error;


// 获取解绑的验证码
+(void)GetFreeDeviceVerifyWithuserID:(NSString*)userID iDCode:(NSString*)iDCode method: (RequestType)method finish: (Finish)finish string:(NSString *)urlString  error: (Error)error;
//解绑设备
+(void)FreeDeviceWithuserID:(NSString*)userID iDCode:(NSString*)iDCode verifyCode:(NSString*)verifyCode method: (RequestType)method finish: (Finish)finish string:(NSString *)urlString  error: (Error)error;
//获取用户的设备信息
+(void)GetUserDeviceWithuserID:(NSString*)userID method: (RequestType)method finish: (Finish)finish string:(NSString *)urlString  error: (Error)error;

+ (void)showAlertView:(NSString *)str;
+ (void)showAlertViewWithCancle:(NSString *)str;

@end
